package com.yykj.user.center.server.model;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.yykj.common.util.serializer.LocalDate2LongSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.UpdateTimestamp;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * @author chenl
 * @version 1.0
 * @date 2021/11/9 14:35
 */
@Data
@Entity
public class Inspect {

    @Id
    private String id;

    @ApiModelProperty("检查/检测项目Id")
    @Column(length = 2000)
    private String itemIds;

    @ApiModelProperty("检查/检测项目名称")
    @Column(length = 2000)
    private String itemNames;

    private String patientCardId;

    private String patientName;

    private String cardNo;

    @ApiModelProperty("检查目的")
    @Column(columnDefinition = "text")
    private String purpose;

    @ApiModelProperty("注意事项")
    @Column(columnDefinition = "text")
    private String attention;

    @ApiModelProperty("创建时间")
    @JsonSerialize(using = LocalDate2LongSerializer.class)
    @CreationTimestamp
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    @JsonSerialize(using = LocalDate2LongSerializer.class)
    @UpdateTimestamp
    private LocalDateTime updateTime;

    @ApiModelProperty("申请医生Id")
    private String appDoctorId;

    @ApiModelProperty("申请医生姓名")
    private String appDoctorName;

    @ApiModelProperty("类型：1检查 2检验")
    private Integer orderType;

    @ApiModelProperty("就诊科室ID")
    private Integer seeDeptId;

    @ApiModelProperty("就诊科室名称")
    private String seeDeptName;

    @ApiModelProperty("有效时长")
    private Integer valid=0;

    @ApiModelProperty("状态1：待预约 2：审核中 3：待检查 4已完成 5已取消")
    private Integer state=1;

    private String orderNo;

    private Integer hospitalId;

    private String hospitalName;

    private String accountId;

    @ApiModelProperty("就诊时间 格式：yyyy-MM-dd HH:mm:ss")
    private LocalDateTime visitTime;

    @ApiModelProperty("取消预约时间")
    private LocalDateTime removeTime;

    private String sex;

    private Integer age;

    private String birthday;

    private String relation;

    @ApiModelProperty("医生腾讯Id")
    private String doctorTencentAccountId;

    @ApiModelProperty("患者腾讯Id")
    private String patientTencentAccountId;
}
